﻿@{this.Init(layout: "~/_SiteLayout.cshtml", title: "Register an Account", action: Account.Register.Init);}
<p>
   Use the form below to create a new account. 
</p>

@* If at least one validation error exists, notify the user *@
@if (!Page.IsValid) {
   <p class="message error">
    @if (Page.Errors.AccountCreation.IsError) {
        @Page.Errors.AccountCreation.Message;
    } else {
        @:Please correct the errors and try again.
    }
   </p>
}

<form method="post" action="">
    <fieldset>
        <legend>Sign-up Form</legend>
        <ol>
            <li class="email">
                <label for="email">Email:</label>
                <input type="text" id="email" name="email" title="Email address" value="@Page.Model.Email" @if(Page.Errors.Email.IsError){<text>class="error-field"</text>} />                
                @if (Page.Errors.Email.IsError) {
                    <label for="email" class="validation-error">@Page.Errors.Email.Message</label>
                }
            </li>
            <li class="password">
                <label for="password">Password:</label>
                <input type="password" id="password" name="password" title="Password" @if(Page.Errors.Password.IsError){<text>class="error-field"</text>} />                
                @if (Page.Errors.Password.IsError) {
                    <label for="password" class="validation-error">@Page.Errors.Password.Message</label>
                }
            </li>
            <li class="confirm-password">
                <label for="confirmPassword">Confirm Password:</label>
                <input type="password" id="confirmPassword" name="confirmPassword" title="Confirm password" @if(Page.Errors.ConfirmPassword.IsError){<text>class="error-field"</text>} />                
                @if (Page.Errors.ConfirmPassword.IsError) {
                    <label for="confirmPassword" class="validation-error">@Page.Errors.ConfirmPassword.Message</label>
                }
            </li>
            <li class="recaptcha">
                <div class="message info">
                    <p>To enable CAPTCHA verification, <a href="http://go.microsoft.com/fwlink/?LinkId=204140">install the ASP.NET Web Helpers Library</a> and uncomment ReCaptcha.GetHtml and replace 'PUBLIC_KEY'
                    with your public key.  At the top of this page, uncomment ReCaptcha.Validate and
                    replace 'PRIVATE_KEY' with your private key, and also uncomment the captchaMessage variable.</p>
                    <p>Register for reCAPTCHA keys at <a href="http://recaptcha.net">reCAPTCHA.net</a>.</p>
                </div>
                @*@ReCaptcha.GetHtml("PUBLIC_KEY", theme: "white")
                @if (Page.Errors.Captcha.IsError) {
                    <label class="validation-error">Page.Errors.Captcha.Message</label>
                }*@
            </li>
        </ol>
        <p class="form-actions">
            <input type="submit" value="Register" title="Register" />
        </p>
    </fieldset>
</form>